I'm trying to find a way to erase the ".png" extension in this JSON file but only for the attribute (so "image": "test.png" should keep .png and "uri": "0.png" should keep it too)
But all the attribute values should be without .png at the end so the value for the background would be Yellow and not Yellow.png
Any tips about this? I tried to use sed command like:
sed -i 's/Yellow.png/Yellow/g' myfile.json
It didn't work and it's not the best way because I would have to do each attribute by hand... (I put a sample but I have more than 100 attributes)
{
"name": "test",
"symbol": "test",
"image": "test.png",
"properties": {
"files": [
{
"uri": "0.png",
"type": "image/png"
}
],
"category": "image",
"creators": []
},
"description": "test",
"seller_fee_basis_points": 0,
"attributes": [
{
"trait_type": "Head",
"value": "1.png"
},
{
"trait_type": "Body",
"value": "Big.png"
},
{
"trait_type": "Left Arm",
"value": "Gun.png"
},
{
"trait_type": "Right Arm",
"value": "Gun.png"
},
{
"trait_type": "Left Legs",
"value": "Normal.png"
},
{
"trait_type": "Background",
"value": "Yellow.png"
},
{
"trait_type": "Right Legs",
"value": "Normal.png"
}
],
"collection": {
"name": "Test",
"family": "test"
}
}