i need to extract only URL and app id in the given string and saved in variables
url:{ "url":"ad.ifwcash.com/www/delivery/afr.php?zoneid=127&cb=2015738640", "app":61}
final result like
variable_1 : ad.ifwcash.com/www/delivery/afr.php?zoneid=127&cb=2015738640
variable_2 : 61
Here's another hybrid solution using JScript. (Still save it with a .bat extension.)
Output:
Delayed expansion was used to prevent the
&
in the URL from being evaluated.See this big fat warning if you don't control the generation of the JSON.
this works if there's an
url.txt
file in same directory with content:{"url":{ "url":"ad.ifwcash.com/www/delivery/afr.php?zoneid=127&cb=2015738640", "app":61}}
Eventually you'll need to change name/location of the file on the third line (save the file bellow with.bat
extension):