Json template: Get the value of one attribute by filtering by the value of another

Hi!
I’m fighting with a json obtained from a rest sensor. The problem is that I need to obtain the value of an attribute by filtering the json by the value of another attribute of the object. I’m trying to use jsonpath but I do not get it. Any ideas?

Note 1: I can not use the ID to obtain the object, since it is not always the same, and to be sure of recovering the correct value, I need to filter by the “description” attribute.
Note 2: The sensor are getting values from Victron (solar grid controller) API

I’m tryint this: value_template: ‘{{states.sensor.vrm_data.records[?(@.description==“State of charge”)].formattedValue[:-2] | float() }}’

The json file has this format:

{
“success”: true,
“records”: [
{
“idSite”: 32642,
“timestamp”: 1560577779,
“Device”: “Gateway”,
“instance”: 0,
“idDataAttribute”: 1,
“description”: “gatewayID”,
“formatWithUnit”: “%s”,
“dbusServiceType”: null,
“dbusPath”: null,
“code”: “d”,
“formattedValue”: “Venus OS”,
“id”: 1
},
{
“idSite”: 32642,
“timestamp”: 1560577779,
“Device”: “Gateway”,
“instance”: 0,
“idDataAttribute”: 386,
“description”: “Productid”,
“formatWithUnit”: “%s”,
“dbusServiceType”: null,
“dbusPath”: null,
“code”: “mi”,
“formattedValue”: “C001”,
“id”: 4
},
{
“idSite”: 32642,
“timestamp”: 1560577779,
“Device”: “Gateway”,
“instance”: 0,
“idDataAttribute”: 387,
“description”: “MachineName”,
“formatWithUnit”: “%s”,
“dbusServiceType”: null,
“dbusPath”: null,
“code”: “mn”,
“formattedValue”: “Color Control GX”,
“id”: 5
},
{
“idSite”: 32642,
“timestamp”: 1560790182,
“Device”: “Battery Monitor”,
“instance”: 512,
“idDataAttribute”: 51,
“description”: “State of charge”,
“formatWithUnit”: “%.1F %%”,
“dbusServiceType”: “battery”,
“dbusPath”: “/Soc”,
“code”: “SOC”,
“formattedValue”: “95.0 %”,
“id”: 105
}
]
}

Thank you!