0

I return a list of string for the combobox that serialized look like:

data:{"option1", "option2", "option3"...}

JsonReader have a list of fields, lets said we want to map to a OPT field:

reader: new Ext.data.JsonReader({...
   fields: [ {name: 'OPT', mapping: '???'} ]
})

I understand that mapping should be point to the property name... but string doesn't have value/content property.

Jaider
  • 14,268
  • 5
  • 75
  • 82

1 Answers1

0

What you have supplied isn't valid JSON.

It either needs to be (use an Array Reader)

data: ["option 1", "option 2", "option 3"]

Or (mapping would be "name")

"data": [{
    "name": "option 1"
}, {
    "name": "option 2"
}]
Evan Trimboli
  • 29,900
  • 6
  • 45
  • 66