Reputation: 10056
So I have an output from an ajax response call
You can view the image here:
This is the output from: console.log(data)
but I don't know how to access these values? Any help?
Upvotes: 0
Views: 51
Reputation: 236192
dataset
is the HTML5 way to store Node related data. Its pretty much a property that is available on any node and get get accessed like
MyjQueryCollection[ 3 ].dataset.lastId;
You need to grab the underlaying DOM node, you cannot access that property on a jQuery object/collection directly, since it does not get abstracted by jQuery. This is accomplished by referencing the indexed value of the node here.
Upvotes: 5