Forum Discussion
bojanvelevski
5 years agoValued Contributor
Hi @KTsnap,
There is multiple ways of adding an element to an array. Besides the .push() method, you can use array concatenation:
$value.concat([{"color":null,"default":false,"description":null,"isActive":null,"label":"Active","urls":null,"valueName":"Active"}])
OR
[...$value,{"color":null,"default":false,"description":null,"isActive":null,"label":"Active","urls":null,"valueName":"Active"}]
Regards,
Bojan
KTsnap
5 years agoNew Contributor III
Hi Bojan,
I tried the above syntax. But its giving only the value inside the array. I need those value along with the input (the way extend works)