Skip to content

Traverse JSON for matching @id property #7

@edsilv

Description

@edsilv

I have a new requirement for the 'manifesto' library:

UniversalViewer/universalviewer#186

I need to be able to traverse an IIIF manifest (using traverseUnique?) to find a node with a given '@id' property. Example manifest:

http://wellcomelibrary.org/iiif/b18035723/manifest

It looks like exjs can do this:

https://github.com/BSick7/exjs/wiki/fromJson

But am I going to need to create mappings for every node type in the IIIF spec? Or can it be generalised somehow? It would be great if it just needed to know that there can be objects with an @id, or there can be arrays of objects with an @id...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions