ST2 Store & JSON Reader: How to retrieve custom metadata fields?
Hello,
I'm a newbie to ST, so this may sound like a basic question.
I have tried to look for a solution for this but have not been able to find one. Basically, I have a store and proxy setup to load JSON data. I wanted to see if there was a way to get value for fields that are outside the actual results array. I know we can set some properties like "totalProperty" and "messageProperty" and access these with ResultSet methods like "getTotal()" and "getMessage()". How about custom fields? Anyway to access those?
Below is an example of what I'm talking about. How can I setup my store/proxy/reader setup to be able to retrieve the values for "query_id" and "query_time"? I do not need to store these in a store or anything, I just need to capture these and store them in variables. I can use "totalProperty" and "messageProperty" to get the query_total and query_message.
Code:
{
"success": true,
"query_id": "ID-1234",
"query_time": "19837382849",
"query_total": "227",
"query_message": "Successfully retrieved",
"users": [
{
"firstName": "Tommy",
"lastName": "Maintz",
"age": 24,
"eyeColor": "green"
},
{
"firstName": "Aaron",
"lastName": "Conran",
"age": 26,
"eyeColor": "blue"
},
{
"firstName": "Jamie",
"lastName": "Avins",
"age": 37,
"eyeColor": "brown"
}
]
}
Please let me know if I can provide any clarifications. Any help is greatly appreciated. Thanks in advance.
Mohammad
San Jose, CA