Skip to content

Access sub-attribute via dot notation ("address.street") #525

@Xennis

Description

@Xennis

Hey,

my API returns data in the format (extract only):

[
        {
            "id": 1,
            "address": {
                "street": "Heidberg",
                 "postal_code": "75385"
            }
        },
        {
            "id": 2,
            "address": {
                "street": "Heinrich-Böll-Str.",
                "postal_code": "70707"
            }
        },
        ...
]

How can I access for instance the street attribute? It would be nice, if I could access it directly by nga.field('address.street'), but that does not seems to work. Of course I could define the field as template field and write a directive. But when I've many of such fields, that would not be so nice. Or is there another, simple way?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions