Filters/Functions to convert an Object into an Array of Primitives? (RESOLVED: See Solution)

Options
Hi Team,
I've done it but am looking for a better way.
1. User inputs JSON
2. Create a variable which takes the JSON input and converts it into an object (array filter: first) --> variable called "object"
3. Create a variable called "keys" which applies the "keys" filter to object --> variable called "keys"
4. Create a variable called "values" which applies the "values" filter to object --> variable called "values"
5. Run a For Each Loop on the "index"
6. Create a variable which gets the "value of keys" from the "index" AND concatenates it with the "value of values" from the "index'


Is there any function/filter that can do this directly?
I am perfectly fine if some direct filter leads to an ouput like

array_of_primitives: ["name: umair", "age: 28", "location: Islamabad" ]
[Screen Shot 2022-06-22 at 22.08.01 PM.png][Screen Shot 2022-06-22 at 22.08.30 PM.png][Screen Shot 2022-06-22 at 22.08.40 PM.png]

Comments

  • Umair Kamil
    Umair Kamil Member
    Options
    Apologies! Resolved now
    [Screen Shot 2022-06-22 at 23.11.23 PM.png][Screen Shot 2022-06-22 at 23.13.00 PM.png][Screen Shot 2022-06-22 at 23.11.36 PM.png]
  • Inayet Hadi
    Inayet Hadi Member
    Options
    I was looking for something like this!!! Thank you  for sharing, I am going to play/test to see if I can make it work for my case
  • Umair Kamil
    Umair Kamil Member
    Options
     Great! Let me know if you need any help!