Hi, If this is a literal quote from your JSON file, you'll need to reorganize it so the items are all flat, not nested. That is, give your item with id: 0 a sensible value for the type: property (Text?), make the objects that are fileReferences their own items, and give them a separate type: value (File?) and an identifier.
Your property fileReferences should be set as having a valueType: of "item" in a schema. See http://simile.mit.edu/wiki/Exhibit/Getting_Started_Tutorial#Schema Finally, fileReferences should list the Files by reference to their identifier. Your expression would read ".fileReferences.fileName". The core of your question appears to be about extracting one item out of a list - but order of values is not maintained, and there is no support for an expression syntax using information about the original ordering. If you want just one list element, I would suggest using a different property for the File you want to show. { "items": [ { "id": 0, "name": "IDS_BLA_BLUB", "count": 4, "label": "blablub" "fileReferences": [ "SatSettings.java", "prop.ini" ] }, { "label": "SatSettings.java", "fileName": "D:\\Development\\eclipse_workspace\\bla\SatSettings.java" ... ], "properties": { "fileReferences" : { "valueType": "item" } } } On 6/20/11 1:57 AM, cturner wrote: > Hi, > > I use the following JSON file and want to reference an attribute of an > object of the fileReferences array to display in my exhibit. > > { > "items": [ > { > "id": 0, > "name": "IDS_BLA_BLUB", > "count": 4, > "label": "blablub", > "fileReferences": [ > { > "fileName": > "D:\\Development\\eclipse_workspace\\bla\SatSettings.java", > "lineNumber": 138, > "line": "sat.setTextId(\"IDS_BLA_BLUB\");" > }, > { > "fileName": "D:\\Development\\prop.ini", > "lineNumber": 287, > "line": "satSet: \"IDS_BLA_BLUB\"" > } > ] > } > ] > } > > I tried to use something like this: <div class="fileReferences"><span > ex:content=".fileReferences[0].fileName"></span></div> but it didn't work. I > couldn't find any examples on how to handle such references. So It would be > great if somebody could help me out.. > > Best, > Chris > > -- You received this message because you are subscribed to the Google Groups "SIMILE Widgets" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/simile-widgets?hl=en.
