简体   繁体   中英

How to store JSON data in database(heidiSQL) using javascript?

I have data in JSON format. I am able to create object in javascript for that as below.

var text = '{"title":"abc","desc":"pqr" ,"img":"mno"}';
obj = JSON.parse(text);
document.getElementById("demo").innerHTML =
obj.title + " " + obj.desc;

Now, I just want to store the value of that JSON object in database(heidiSQL).

My table's attributes are as follows: 1)title, 2)description, 3)image

首先将数据存储在CSV文件中,然后从Java读取CSV文件,然后将这些属性存储在数据库中。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM