Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Convert a list to array and Pass to JSON body

Hi, I'm new to Power BI.  I would like to pass existing list of values as array to the JSON body.  List 27767321 27739924 27739926 body = "{""taskId"":[27767321,27739924,27739926]}", <-- THIS ...
  • parry2k's avatar
    7 years ago

    Anonymous try following,

     

    on your list , click advanced editor and add following step

     

     MyList = Text.Combine( LastStepofList, ",")
    In
    MyList

    Basically it will combine your list into text, comma seperated and in your json query, in advanced editor do following:

     

    body = "{""taskId"":[" & MyListQuery & "]}",