playMaker

Author Topic: Web Request string into variables  (Read 877 times)

zzap64

  • Playmaker Newbie
  • *
  • Posts: 35
Web Request string into variables
« on: July 13, 2020, 03:40:03 PM »
Hello,

I'm trying to import this data and turn it into variables. Its realtime weather info:
example:
"coord":{"lon":-123.92,"lat":49.52},"weather":[{"id":801,"main":"Clouds","description":"few clouds","icon":"02d"}],"base":"stations","main":{"temp":291.61,"feels_like":291.2

My goal is to use the values of areas such as "temp" for example.

I use Web request and save it as a string. Just wondering what my next steps are? do i need to some how put it into an XML file or setup an array?
« Last Edit: July 13, 2020, 05:11:29 PM by zzap64 »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Web Request string into variables
« Reply #1 on: July 14, 2020, 02:47:16 AM »
Hi,

you have datamaker right? you should have actions to turn a json string into an xml, which then can let you run xpath queries, you also have on the ecosystem some json actions to extract properties into arrays.

Bye,

 Jean

zzap64

  • Playmaker Newbie
  • *
  • Posts: 35
Re: Web Request string into variables
« Reply #2 on: July 14, 2020, 05:51:35 PM »
thanks for the advice, ill certainly look into that. cheers mate.