AppleScript : Set do script result as variable
Solution 1:
You want the brand and the country_name from the JSON
data, you can use a JSON parser.
Here is an example of parsing JSON
in python
-- Get https://www.binlist.net/json/431940
set cc to the clipboard as string
set finalresult to do shell script "curl https://www.binlist.net/json/" & cc & " | /usr/bin/python -c 'import json, sys; obj=json.load(sys.stdin); print obj[\"brand\"],obj[\"country_name\"]' "
display notification "Result is " & finalresult --> "Result is VISA Ireland"