10-02-2013, 07:54 PM
Great - that works :-).
What if I wanted to return an array of a type that wasn't string?
This will work fine for an array of strings:
but I don't see how to index into the elements of bodyItems (something like bodyItems [0].fieldname?)
What if I wanted to return an array of a type that wasn't string?
public class QMBodyField
{
public string fieldName { get; set; }
public string defaultText { get; set; }
public string text { get; set; }
}
public class QMResults
{
public QMBodyField[] bodyItems { get; set; }
public string impressionFieldName { get; set; }
public string[] recommendationItems { get; set; }
}
This will work fine for an array of strings:
ARRAY(str) recommendationItems = results.recommendationItems
out F"n recommendationItems = {recommendationItems.len}"
for(_i 0 recommendationItems.len)
,out F"{_i} {recommendationItems[_i]}"
but I don't see how to index into the elements of bodyItems (something like bodyItems [0].fieldname?)