D
D
doctor22who2017-05-31 22:52:11
PHP
doctor22who, 2017-05-31 22:52:11

How to properly get data from json to jquery?

Through ajax from the server to the browser I send data in json format

[{"domu_id":"533","email":"[email protected]","data":"0","token":"secret","command":null,"created":"2017-05-31 21:10:35","digits":"10956237","date_com":null},{"domu_id":"535","email":"[email protected]","data":"0","token":"secret","command":null,"created":"2017-05-31 21:53:51","digits":"10956237","date_com":null}]

How to unpack it using jquery?
Tried like this
$.each(data, function(key, val){
    console.log(val.email);//here data 
     //console.log(val['email']);//here data 

  });

but it doesn't work

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question