How to send List in settings_data.json

Hi Team,
Our requirement is to keep On boarding screen as dynamic in mobile apps, which we need a help how to send as List in settings_data.json.
Can you please share sample example json which helps us to understand more.

Referred below link:-

Hello @Sankar_Babu

As you have shared a reference article along with your question, I assume you want an option in the theme’s editor UI to tweak some feature value.

You can definitely do that by implementing code config in your theme’s settings_schema.json file.

I am sharing an example along with the code snippet for your reference:

Example: We want to add an option in the theme’s editor UI as “Product Quantity Config”. Using this feature, users can set the cart limit for customers directly from the UI. In this feature, we will be providing three options for the user to set the limit for:

    1. max_cart_quantity
    1. quantity_gng
    1. quantity_hd

Code snippet: (settings_schema.json)

{
  "props": [
    {
      "type": "text",
      "category": "Product Quantity Config",
      "id": "max_cart_quantity",
      "default": "",
      "label": "Max product quantity allowed for purchase"
    },
    {
      "type": "text",
      "category": "Product Quantity Config",
      "id": "quantity_gng",
      "default": "",
      "label": "Max allowed quantity for grab and go products"
    },
    {
      "type": "text",
      "category": "Product Quantity Config",
      "id": "quantity_hd",
      "default": "",
      "label": "Max allowed quantity for home delivery products"
    }
  ]
}

You will have to add CSS to these options further.

Example:

{
      "type": "url",
      "category": "Header",
      "id": "redirect_url_buynow",
      "label": "Redirect URL for Buy Now"
    },
    {
      "type": "header",
      "category": "Colors",
      "value": "Header"
    },
    {
      "type": "color",
      "category": "Colors",
      "id": "header_bg_color",
      "label": "Background",
      "default": "#ffffff"
    }

Now, once you define this in the settings_schema.json file, you will have to call the defined IDs globally.

Example:

    this.global_config.props.quantity_gng,
    this.global_config.props.quantity_hd,
    this.global_config.props.max_cart_quantity

Also, settings_data.json - This file hosts the saved values of the settings from settings_schema.json.

I hope this will help you to get started.

Hi Team,
Actually we want to pass as List object in settings_schema.json as custom object and which can get as List in settings_data.json from custom object.
For Ex:- We are planning to have OnBoarding screens which will be dynamic. The screens count should be configurable.

Hi Team,
Please help on this

@Sankar_Babu We are currently reviewing the request and will provide updates soon.

@afrozshaikh - Do we have any update on this?

Hello @Sankar_Babu

As mentioned earlier, you will need to define the object as a text type in the settings_schema.json file. Once it is defined, it will be reflected in the UI. After it displays on the UI, you can add the values. When you synchronize (sync) your theme, your added values will be included in your settings_data.json. Afterward, you will need to globally call them to list globally.