0
How can I search for JSON objects by the tags assigned to them? Type I want to get all objects that have the "algodao" tag. I’m creating the model as it is down there for now, but I don’t know if it’s the best way, someone gives me a light?
{
"ofertas": [
{
"id": 1,
"categoria": "masculino",
"titulo": "Blusa Clássica",
"descricao_oferta": "Camisa confeccionada em tecido leve de algodão com poliéster.",
"anunciante": "riachuelo",
"valor": 59.90,
"destaque": true,
"data" : "1970-01-01 00:00:00",
"tags": [
{"tag": "algodao"},
{"tag": "blusa"},
{"tag": "azul"},
{"tag": "classica"}
],
"imagens": [
{
"url": "/assets/ofertas/camisa-social/camisa-classica-01.jpg"
},
{
"url": "/assets/ofertas/camisa-social/camisa-classica-02.jpg"
},
{
"url": "/assets/ofertas/camisa-social/camisa-classica-03.jpg"
},
{
"url": "/assets/ofertas/camisa-social/camisa-classica-04.jpg"
}
]
},
...
}
can be by browser locally, I just want to know the path I have to follow to get this object. And if the way I structured it is the most practical. I was trying it: http://localhost:3000/ofertas?tags?tag=algodao
but I was unsuccessful.
in what language do you want to do this ? java , javascript php , python ?? :/
– ScrapBench
can be by browser locally, I just want to know the path I have to follow to get this object. And if the way I structured it is the most practical. I was trying it:
http://localhost:3000/ofertas?tags?tag=algodao
– Wesley Feitosa
ok if I’m not mistaken what you’re trying to do is not possible without an interface to interpret your json , json is nothing more than an encoding or JSON object is just a string that can be interpreted by programming languages, you will need something to retrieve your object (php ,js) would be ideal because you talked about recovering through a URL
– ScrapBench