I'm not even sure if this is possible but I'd like to map a property on a node to each item in an array which is also a property on the node.
JSON example
"productType" : {
"name" : "foo",
"products" : []
}
So I want the value of name to be a property on each product.
I have a productType model set up which has an NSArray on there and everything is mapped by JSONModel. I was thinking there could be a way using the keypath in JSONKeyMapper? But couldn't find anything.
You can now do this with
JSONModel
.Assume we have the following model:
If the complete JSON doc looks like this:
then you should use one of the
[MyModel dictionaryOfModelsFrom...];
methods.If it looks like this:
Then you should use another model like this: