You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to create a JSON as following { "stock":{ "shops":[ {"location": "high street"}, {"location": "mall"} ] }, "name":"john" }
through normal javascript, I can access the first shop detail with stock.shops[0]
I can put name under model in the uiSchema to correctly link the name (like the following) component: "div", fieldOptions: { class: ["form-group"], }, children: [ { component: "label", fieldOptions: { attrs: { for: "name-id", }, class: ["font-weight-bold"], domProps: { innerHTML: "Name", }, }, }, { component: "input", model: "name", errorOptions: { class: ["is-invalid"], }, fieldOptions: { attrs: { id: "name-id", }, class: ["form-control"], on: ["input"], }, },
however, putting stock.shops[0] result in the following error
Error: schema is invalid: data.properties['shops'].properties should be object
How should I go about if I want to add an array for shops as shown in my example?