Using a basic array to reference icons like so:
{name: "text", avatar: srcs[15]}
has been working perfectly. However, I am now dynamically creating an array from my JSON API, resulting in an array of objects structured like this:
{name: "text", avatar: "srcs[15]"}
This is causing issues as I am unable to reference my avatars properly. How can I remove the double quotes and make my array function correctly again?
It's important to note that I do not want to retrieve the value of srcs[15]
into the array, but simply create a reference to the source array.