Forum Discussion

musicbydannyd's avatar
musicbydannyd
Advocate IV
6 years ago
Solved

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...
  • V-lianl-msft's avatar
    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
        Source

     

    Best Regards,
    Liang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.