I'd like to get the size of a vector in a JSON in the scriipt shell but I'm only getting the size of each vector string, ie for the example:
#!/bin/bash
j='{"Nomes": { "nome": ["maria", "jose", "vitor","caio"] }}'
echo $j
echo $j | jq -r ".Nomes | .nome[] | length"
Exit beyond JSON:
5
4
5
4
But I wanted to get 4 that is the amount of items in the vector.