Page 1 of 1

Response information jsonp_1 ({"***"}) format, how to extract information

Posted: 16 Jun 2020 02:20
by Justso_
example:
jsonp_1592191820948_64292({"code":"0","data":{"growth":"18","nutrients":"0","beanState":"2","beanImg":"https://m.360buyimg.com/mobilecms/jfs/t ... e51465.gif"}});

How to get the value of growth ?

Thank you for your help....

Re: Response information jsonp_1 ({"***"}) format, how to extract information

Posted: 22 Jun 2020 21:09
by Horschte
Try this:

Code: Select all

mytext='jsonp_1592191820948_64292({"code":"0","data":{"growth":"18","nutrients":"0","beanState":"2","beanImg":"https://m.360buyimg.com/mobilecms/jfs/t ... e51465.gif"}});';
match = findAll(mytext, ".*growth\":\"(.*)\",\"nut", true)[0][1];

Re: Response information jsonp_1 ({"***"}) format, how to extract information

Posted: 23 Jun 2020 09:27
by Justso_
Horschte wrote:
22 Jun 2020 21:09
Try this:

Code: Select all

mytext='jsonp_1592191820948_64292({"code":"0","data":{"growth":"18","nutrients":"0","beanState":"2","beanImg":"https://m.360buyimg.com/mobilecms/jfs/t ... e51465.gif"}});';
match = findAll(mytext, ".*growth\":\"(.*)\",\"nut", true)[0][1];
Thank you !
Learning how to use

Re: Response information jsonp_1 ({"***"}) format, how to extract information

Posted: 26 Jun 2020 19:03
by Micky Micky
Hello,

Could you provide a link to the site which gave you that JSON response?

Many thanks

Micky