Forum Discussion

saritak's avatar
saritak
New Contributor
4 years ago
Solved

How to set the custom properties on project level if the property is coming multiple time inResponse

Hi All ,

 

I need a suggestion how to set the custom properties on project level if the required property value will come multiple times in loop . Take an example , I have to set the custom properties for below property value :

(a) Id 

(b) StreamingUrl

but both property is coming multiple times in response so if I will apply the loop , I will be able to get it for all but then how to do set since I need to grab these values from one API and need to pass in different API to get the response . Please help , it's high priority to me since I am aware how to set if it will come one time but not sure how to do if it will come in loop .

 

Please find the response json : ( I have given here the short data but it will repeat the same 20 times )

 

{
"Shuffled": true,
"TotalTracks": 20,
"Tracks": [
{
"Provider": "QQ",
"TrackOptions": "212782314",
"Album": {
"Cover": "http://y.gtimg.cn/music/photo_new/T002R120x120M000002JdNyK4A9iuS_1.jpg",
"ID": 3866362,
"Title": "Fall"
},
"Artist": {
"ID": 243334,
"Name": "I Am Dive"
},
"ID": 212782314,
"FavoriteURL": "Tidal/updatefav/212782314",
"Length": 1202841,
"StreamingUrl": "Tidal/streamingurl/212782314?recentdata=%7B%22album_id%22%3A3866362%2C%22album_mid%22%3A%22Fall%22%2C%22album_name%22%3A%22Fall%22%2C%22album_pic%22%3A%22http%3A%2F%2Fy.gtimg.cn%2Fmusic%2Fphoto_new%2FT002R120x120M000002JdNyK4A9iuS_1.jpg%22%2C%22album_title%22%3A%22Fall%22%2C%22singer_id%22%3A243334%2C%22singer_name%22%3A%22I+Am+Dive%22%2C%22song_id%22%3A212782314%2C%22song_mid%22%3A%22002GJTjz2lts7l%22%2C%22song_name%22%3A%22Lines%22%2C%22song_play_url%22%3A%22http%3A%2F%2Fisure6.stream.qqmusic.qq.com%2FC200004YCdgj3Jyf75.m4a%3Fguid%3D2000001669%26vkey%3DA120EEC7DF54154D994949A91259599CBAFC0A77BDF8113110FD892AB21F4D2178AD010CD466F2C94C4B1F511BA162AD6009A682CD07E5BB%26uin%3D%26fromtag%3D231%22%2C%22song_size%22%3A1202841%7D&contentProvider=QQ",
"Title": "Lines"
},
{
"Provider": "QQ",
"TrackOptions": "201700645",
"Album": {
"Cover": "http://y.gtimg.cn/music/photo_new/T002R120x120M000003JUUkf3IROdv_1.jpg",
"ID": 1987801,
"Title": "Elephant House"
},
"Artist": {
"ID": 1451930,
"Name": "Elephant House"
},
"ID": 201700645,
"FavoriteURL": "Tidal/updatefav/201700645",
"Length": 3138484,
"StreamingUrl": "Tidal/streamingurl/201700645?recentdata=%7B%22album_id%22%3A1987801%2C%22album_mid%22%3A%22Elephant+House%22%2C%22album_name%22%3A%22Elephant+House%22%2C%22album_pic%22%3A%22http%3A%2F%2Fy.gtimg.cn%2Fmusic%2Fphoto_new%2FT002R120x120M000003JUUkf3IROdv_1.jpg%22%2C%22album_title%22%3A%22Elephant+House%22%2C%22singer_id%22%3A1451930%2C%22singer_name%22%3A%22Elephant+House%22%2C%22song_id%22%3A201700645%2C%22song_mid%22%3A%220020zFNr1CPwZ9%22%2C%22song_name%22%3A%22Camel+Mom%22%2C%22song_play_url%22%3A%22http%3A%2F%2Fisure6.stream.qqmusic.qq.com%2FC2000038gl8Z3FPq24.m4a%3Fguid%3D2000001669%26vkey%3DA7664B53C33E70B86BA26BD01FCD65F60D06730B53DBCFBF70699E8209154491549E713F7DB185EFBC52526368B7543954B07D715C23E2AC%26uin%3D%26fromtag%3D231%22%2C%22song_size%22%3A3138484%7D&contentProvider=QQ",
"Title": "Camel Mom"
},

  • Hi saritak :

     

    You need to append some int value to the id and SteamURL, so expample:

     

    id0, id1, id2 and so on and likewise for StreamURL.

     

    Hope it will help.

2 Replies

  • Hi saritak :

     

    You need to append some int value to the id and SteamURL, so expample:

     

    id0, id1, id2 and so on and likewise for StreamURL.

     

    Hope it will help.