0

I went to URL: https://explorecalifornia.org/api/weather/city/ I did a CTRL+F and searched the exact term (quotation marks are included in the search): "name" It returned 7,322 results!! From Afghanistan to Gweru and everywhere in-between.

I'm trying to utilise a weather API of which I cannot find any documentation for. What I want to know is: how can I extract only specific data, i.e. "name" from the above URL?

I'm trying to fill a data table with a list of city names that the API uses so I can use them to search for weather forecast information later on.

I'm using Microsoft's Power Automate Desktop > Invoke a web service > and returning the data in JSON format.

I have tried reading in the whole data object. I expected it to take forever, it did. (not optimum for each time I want to run it) I'm new to power automate desktop, JSON data and invoking web services.

Edit: using regex, how would I find the next word, without quotation marks after: "name":

e.g. "name":"Feyzabad","name_ascii":"Feyzabad","name":"Pol-e Khomri","name_ascii":"Pol-e Khomri"

The only word out of anything I want is Feyzabad and Pol-e Khomri

(?<="name":")([^"]*)

I have no made it this far, How can I add the /g flag into power automate desktop?

SOLVED!

I changed the way I have been attempting it with the help of a friend on discord. Instead of extracting data from a webpage, I used a get data from webpage function and then a parse text function to parse the information I wanted using the regex expression above.

Not sure how to close a question on here

  • Don't use regex, parse the JSON properly https://powerusers.microsoft.com/t5/Power-Automate-Desktop/Parsing-json-data-in-Power-Automate-Desktop/td-p/1840636 – CAustin Sep 01 '23 at 04:24
  • I will parse the JSON properly but right now; I'm just trying to get only the names. I have another flow that I'm using but I only have as many city names as I could be bothered to read through and extract manually. I'm also doing this to learn regex. thanks for the link tho that will help me later on :D – Karl Moody Sep 01 '23 at 10:07
  • I tried to invoke a web service in PAD and it drops the connection when I try to read in the entire JSON data. I'm not sure why but I'm thinking it does so because the file is so large. – Karl Moody Sep 01 '23 at 10:41

0 Answers0