Compare two sources the first works the second doesn’t
First source
var source = {
datatype : "observablearray",
datafields : [{
name : "__KEY"
}, {
name : "__STAMP"
}, {
name : "ID"
}, {
name : "firstName"
}, {
name : "middleName"
}, {
name : "lastName"
}, {
name : "ContactType",
map : 'ContactType>name'
}],
id : '__KEY',
localdata : model.items.peek().__ENTITIES
}
Second source
var source = {
datatype : "observablearray",
datafields : [{
name : "__KEY"
}, {
name : "__STAMP"
}, {
name : "ID"
}, {
name : "firstName"
}, {
name : "middleName"
}, {
name : "lastName"
}, {
name : "ContactType",
map : 'ContactType>name'
}],
id : '__KEY',
root : '__ENTITIES',
localdata : model.items
}
Please see this fiddle for working example, then change localdata : model.items.peek()._ENTITIES to localdata : model.items and add root : ‘__ENTITIES’, I thought that this should have the same results?
Thanks,
Dan