I have a list of JSON objects, and I want to access the one with the key called "91842301" for example. See the code below.
How can I do this?
I have tried using functions such as find, where, propertyOf and others, but these do not take into consideration that I am searching through a list of objects that I know only the key of and not the placement in the list.
[{
"918345787": [
{
"year": "2018",
"name": "Lucidtech AS",
"organizationNumber": "918345787",
"employees": "5",
"currency": "NOK",
"totalOperatingIncome": 481000,
"personnelExpenses": 900000,
"salaryCosts": 741000,
"operatingProfit": -1043000,
"netIncome": -1042000,
"timestamp": "2019-7-2 13:30:16",
"daughter": "No avaliable information about daughters"
},
{
"year": "2017",
"name": "Lucidtech AS",
"organizationNumber": "918345787",
"employees": "unknown",
"currency": "NOK",
"totalOperatingIncome": 300000,
"personnelExpenses": 813000,
"salaryCosts": 710000,
"operatingProfit": -622000,
"netIncome": -621000,
"timestamp": "2019-7-2 13:30:16",
"daughter": "No avaliable information about daughters"
}
]
},
{
"979369867": [
{
"year": "2018",
"name": "Sikom AS",
"organizationNumber": "979369867",
"employees": "11",
"currency": "NOK",
"totalOperatingIncome": 18448000,
"personnelExpenses": 5563000,
"salaryCosts": null,
"operatingProfit": 275000,
"netIncome": 56000,
"timestamp": "2019-7-2 13:30:37",
"daughter": "No avaliable information about daughters"
},
{
"year": "2017",
"name": "Sikom AS",
"organizationNumber": "979369867",
"employees": "unknown",
"currency": "NOK",
"totalOperatingIncome": 15467000,
"personnelExpenses": 3453000,
"salaryCosts": 2758000,
"operatingProfit": -1000,
"netIncome": 74000,
"timestamp": "2019-7-2 13:30:37",
"daughter": "No avaliable information about daughters"
}
]
}]