mercredi 8 février 2017

Ge the first value from a multi-dimensional object

Vote count: 0

I have an object called allInvalidFields which lists invalid fields under an identifier e.g _0 or _3

The object could look like this

allInvalidFields = {
    "_0" : {
        0: input.foo,
        1: select.la
    }
    "_1" : {
        0: input.foofoo,
        1: select.lala
    }
}

But equally it could not have _0 as the first key and could look like this:

allInvalidFields = {
    "_1" : {
        0: input.alice,
        1: select.bob
    }
    "_3" : {
        0: input.foo
    }
}

How can I get the first value from the first object in the list? So in the example above it would be input.foo or input.alice depending on which dataset was being searched.

asked 26 secs ago

Let's block ads! (Why?)



Ge the first value from a multi-dimensional object

Aucun commentaire:

Enregistrer un commentaire