I am building a website in asp.net mvc and jquery. I am parsing json objects and sending them from server side to client side. From some reason when I try calling the object it doesn't work. Here is how one of my objects looks when calling console.log(data)
on the jquery callback
{
"songs": [
{
"SongId": 1,
"Name": "Black Eyed Peas - The Time (Dirty Bits)",
"VideoID": "D7K3wFXJFsQ",
"LastUpdated": "/Date(1299951907000)/"
},
{
"SongId": 2,
"Name": "Paramore - The Only Exception",
"VideoID": "-J7J_IWUhls",
"LastUpdated": "/Date(1299951907000)/"
}
]
}
and here is how I try calling it:
console.log(data.songs)
Edit 1 When trying to specy the value as string, right in the client side (writing the string as literal), it works fine.
On the server side I am using JsonResult as the return type.
This keeps giving me an undefined value. Why?
Thank you