Arrays - server side

How I push objects into arrays:

  1. Define the array with Set Value name = Data

  2. Inside a repeat: create an object with Set Value, and in my case:

{{{Name:mj_property_name,Value:mj_property_value}}}

(values come from the query I am putting in the repeat)

  1. Inside same repeat: push it to the array using `Data.push(obj)
    Now your data should be pushed into the array

Note: I am not sure if this formatter already exists in Wappler, but isn’t in the UI. I might’ve made it myself. Either case, if it doesn’t work you can add this custom formatter in extensions/server_connect/formatters/myformatters.js

  1. I’m not sure if I needed this: formatting the data as JSON
1 Like