Skip to content

How to access data with array #87

@mikeerickson

Description

@mikeerickson

Trying to do something like this:

const dotProp = require('dot-prop')

const data = {
  data: [{ price: 1234 }],
}

const result = dotProp.get(data, 'data[0].price')

But result is always undefined

Is this possible with this library? Or perhaps I should look at an alternative?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions