Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
Use igCombo with custom json data schema
posted

I am using a datasource in my .igCombo() which returns json data comprising of several {"id":"name"} items . They have no header or key information like 0:{"Key":"id","Value":"name"} , so that I don't have any pre demarcated valueKey option.

I am trying to declare a json schema like 

var jsonSchema = new $.ig.DataSchema("json", {fields:[
{name: "zoneId", type: "string"},
{name: "siteName", type: "string"}]
});

But , as soon as I bind this 

var ds = new $.ig.DataSource({ type: "json", dataSource: url, schema: jsonSchema });

It hits my datasource and without any skip or top values and no data is being returned from there.

How to work in such cases , or do I need to modify the json response to always include predefined valueKey options in the response.