So I have a sql database which I know the schema to. What I want to do is have a model of that Entity/Table in json format, is there a library that will parse my JSON object and give me sql insert statements for that JSON?
For example, suppose I had
{
Table:{
id: 'abcd'
name: 'Jim'
apples: '5'
}
}
Is there a library that would take that in and give me
INSERT INTO Table1 ('id', 'name', 'apples') VALUES ('abcd', 'Jim', '5');
Thank you in advance. IT's also fine if there's library for doing that but with format that can be translated into from JSON such as XML
db.insert('MyTable', {name:'Adam', phone:'0576940', email:'[email protected]'});