I am trying to locate the index number of a specific item within my object. Here is the object in question:
[
{
"type": "Grayscale",
"mode": "average"
}, {
"type": "Sepia"
}, {
"type": "Invert",
"invert": true
}, {
"type": "Convolute",
"opaque": false,
"matrix": [1, 1, 1, 1, 0.7, -1, -1, -1, -1]
}, {
"type": "Convolute",
"opaque": false,
"matrix": [0, -1, 0, -1, 5, -1, 0, -1, 0]
}, {
"type": "Brownie"
}, {
"type": "Brightness",
"brightness": 0.35
}
]
My goal is to find the index number of the item that has a value of Invert
for the type
property. In this case, the desired output would be 2
. The search should only consider the values of the type
key.