I have an ODATA Rest endpoint query function that gets the data I need.
My problem is that I am having difficulty getting the desired data out of data.d and displaying it in an alert.
The problem code snippet to focus on is shown below:
var result_data = data.d; alert(result_data.results[0]);
In the Visual Studio debugger, look specifically on right portion of the screen, what looks like:
- data.d
- array element [0]
- property new_s_bingolicensetypeId
As someone new to development and CRM, I am certain my problem is one of syntax. I am hoping someone can show me how to write alert(result_data[0]."new_s_bingolicensetypeId") so my alert actually returns 5c87c42e-af6e-e511-adaa-000c29d70c71 instead of an alert box that says "Undefined"
I have to be missing something from a syntax standpoint. Any help would be greatly appreciated.
I also wanted to mention that if I do this:
var result_data = data.d; alert(result_data.results[0]);
the alert box pops up "[object Object]" so I know I am close. I am so close, and just need that extra push to get up the hill.
*This post is locked for comments