Forum Discussion
musicbydannyd
6 years agoAdvocate IV
JSON from URL in Table Column?
I have simple 2 column table with an ID and URL. Basic structure of URL parts are: Static start to URL (for example: https://examplesite.com/gethistory?id=) ID (same text as ID column) &format=js...
- 6 years ago
Hi musicbydannyd ,
Define a variable and then invoke custom function.
M code may like this:
(id as number) as table=> let Source = Table.FromRecords(Json.Document(Web.Contents("https://xxxxxxxx" &Number.ToText(id)&"xxxx"))[subjects]) in SourceBest Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
lbendlin
6 years agoSuper User
Obviously this depends on the format of the actual JSON behind the URLs but you should just be able to expand the records that are returned from each Json.Document(Web.Contents(JSON))
Maybe the column name JSON throws Power Query off?