This is my http://jsfiddle.net/ENMGp/468/ sample code
My Json object
{
"VehicleModels":[
{
"Name":"Model 1",
"Model":{
"MakeName":"Ford"
},
"Styles":[
{
"StockImage":"http://google.com"
}
]
},
{
"Name":"Model 2",
"Model":{
"MakeName":"Ford"
},
"Styles":[
{
"StockImage":"http://bing.com"
}
]
}
]
}
I want to access Styles array, but my viewmodel doesn't allow me to access
Right now your Styles
properties is array, you can access it by Styles()[0].StockImage
Here is the working version for object: http://jsfiddle.net/ysN4m/
And here is the working version for array: http://jsfiddle.net/c6Qvq/
And the other changes is, use <span></span>
instead of <span />