1
I’m using nodejs, Mongoose.
No controllers at the end give a res.json(clientes);
and on my route I create:
app.get('/clientesjson/:id', isLoggedIn, cliente.clientesjson);
I need to access my Json information from the ID. As of now, any information I type in the ID location will open my Json file If I type:
http://localhost:3000/clientesjson/qualquercoisa
Open the Json file.
I want to know how to set an id and only open from it.
http://localhost:3000/clientesjson/43546575867gg556TT7
Just ask a question. I am doing this so I can automatically fill in my inputs after setting a field(select). With this I create a jquery, which I detailed in the following link: http://answall.com/questions/69528/load-campos-automaticamente-com-jquery-e-json?noredirect=1#comment142253_69528 .... This would be the best way, or there is another simpler way to create a Json for this?
– Nodejs
@Nodejs I’m going to follow this question about how to create JSON in the other question so we don’t mix questions.
– Sergio