Map JSON Array values to individual objects
In my app I make a call to web service and get JSON as a response. The structure of the JSON is following:
{
"ns1:AuthenticateResponse": {
"@xmlns:ns1": "authentication:xsd:1",
"ns1:Serial": "0012345.110000.101",
"ns1:Status": "Product is valid",
"ns1:MessageText": "Serial Number you entered for Product1 is verified",
"ns1:DetailedText": "For additional product information call customer service at 1 866 383 5205 ...",
"ns1:Attributes": {
"ns1:Attribute": [
{
"ns1:name": "Description",
"ns1:value": "Product1"
},
{
"ns1:name": "Name",
"ns1:value": "Product1 Name"
},...
The web service response is mapped like this (automatically):
My questions is:
how do I map specific "ns1:Attributes" array element to 2 different text fields on the UI?
i.e. if I want one textbox to display the second element value and another textbox to display the first element value, how can I say something like ns1:Attribute where is an integer referring to an element order in the array?
thanks