My array:
result = {"ids":[{"tid":"121"}],"tid":[{"tid":"121"}]}
I want to display the value of tid inside ids and tid inside tid using ajax but I don't know how to do it. I have tried result.val(result.ids.tid) but that gives me undefined. I have also tried result.val(result.ids["tid"]) with and without quotes on tid but it still doesn't work.
Does anyone know how I can get the output of 121 from the result array?
result.ids[0].tidvar result = {"ids":[{"tid":"121"}],"tid":[{"tid":"121"}]}. then type result and press enter. You should now be able to traverse into the data and figure out how this works, so you can do it next time as well. Teach a man to fish and all that.