Move data from array to Global Variables

I have a Global Variable named SpeakerURI.

The information I want to transfer in the Current Stats of a Sonos Player.

image

The variable trackData contains an array. In this array there are multiple values, examples: audioSource, station, artist, album etc. How do I retrieve any of these and put them into a Global Variable?

image

Why are you trying to pull that information out? What are you going to do with it? You do realize that the track description is right below that field and is readable as it is, right? If you're looking to display what is playing, why not use that?

Fine question. I need to URI and trackNumber in order to make a solution on TTS replacing the Sonos Queue on a speaker that is not playing any music.
Problem description is here: SONOS TTS - Go back to queue

How are you going to request the track number after the tts announcement?

It's outside the scope of the help I need.
But okay, here goes:

In simple words: I have an Ikea remote that switches between my Sonos speakers. When I switch speaker I want a TTS announcement. This TTS announcement is in a condition. Before the TTS i need to store the variable from the array into a global variable. After the TTS I will switch to the queue (with URI). After that I need to set the track according to the trackNumber (which I also want to store in a global variable).

And you've confirmed that the "next track" command works to change to the next track in the sonos playlist you have running?

Yes. I only need the variables uri and trackNumber to make it work.

RM will allow you to pull out data based on a token. But I don't know how it will work in this case. You can try it. If you set a global variable equal to the attribute you can then pull it out based on the token ":".