I have a project, that responds with items that user searches. Each item has its type and meta number (404-0. 404 for type, 0 for meta). Also I have a folder with item images, image name corresponds to the type and meta number of the item. How can I get through all image folder and extract only its name (404-0 without .img) ?
[
{
"type": 0,
"meta": 0,
"name": "Air",
"text_type": "air"
},
{
"type": 1,
"meta": 0,
"name": "Stone",
"text_type": "stone"
},
{
"type": 1,
"meta": 1,
"name": "Granite",
"text_type": "stone"
},
{
"type": 1,
"meta": 2,
"name": "Polished Granite",
"text_type": "stone"
},
{
"type": 1,
"meta": 3,
"name": "Diorite",
"text_type": "stone"
},
{
"type": 1,
"meta": 4,
"name": "Polished Diorite",
"text_type": "stone"
}
]