Mysql之如何使用json

本文详细介绍了MySQL中如何使用JSON,从需求背景到常用函数,包括创建、查询、修改JSON,以及在单表和多表场景下的操作。重点讨论了JSON在单表查询、新增、修改以及多表关联查询、更新、详情和删除等操作的应用。
摘要由CSDN通过智能技术生成

@(KNB架构)
欢迎关注作者博客
简书传送门

需求
  1. 详情页实现自定义功能,可自行拖拽编辑内容;
  2. 列表页面可自定义搜索功能
  3. 多表业务关联

不规则json模板

    {
   
	"id": "1",
	"title": "手术记录",
	"name": "",
	"describe": "请填写手术记录",
	"questions": [{
   
			"a0": "a0",
			"id": 0,
			"name": "a0",
			"type": 0,
			"input": "a0-input",
			"title": "question1-术前诊断1",
			"answer": [{
   
					"id": 0,
					"a0-0": "a0-0",
					"name": "a0-0",
					"type": 0,
					"input": "question1-answer-a0-a0-0",
					"title": "question1-answer-术前诊断",
					"content": "sdsd",
					"describe": "question1-answer-手术前的检查",
					"ischecked": 0,
					"locationinput": "questions[0].answer[0].input",
					"locationdescribe": "questions[0].answer[0].describe",
					"locationtitle": "questions[0].answer[0].title",
					"locationcontent": "questions[0].answer[0].content"

				},
				{
   
					"id": 0,
					"a0-0": "a0-0",
					"name": "a0-0",
					"type": 0,
					"input": "question1-answer-a0-a0-0",
					"title": "question1-answer-术前诊断",
					"content": "sdsd",
					"describe": "question1-answer-手术前的检查",
					"ischecked": 0,
					"locationinput": "questions[0].answer[1].input",
					"locationdescribe": "questions[0].answer[1].describe",
					"locationtitle": "questions[0].answer[1].title",
					"locationcontent": "questions[0].answer[1].content"
				}
			],
			"writeOr": 0,
			"describe": "question1-手术前的检查1",
			"locationinput": "questions[0].input",
			"locationdescribe": "questions[0].describe",
			"locationtitle": "questions[0].title",
			"locationcontent": "questions[0].content"
		},
		{
   
			"a0": "a0",
			"id": 0,
			"name": "a0",
			"type": 0,
			"input": "a0-input",
			"title": "question1-术前诊断1",
			"answer": [{
   
					"id": 0,
					"a0-0": "a0-0",
					"name": "a0-0",
					"type": 0,
					"input": "question1-answer-a0-a0-0",
					"title": "question1-answer-术前诊断",
					"content": "sdsd",
					"describe": "question1-answer-手术前的检查",
					"ischecked": 0,
					"locationinput": "questions[1].answer[0].input",
					"locationdescribe": "questions[1].answer[0].describe",
					"locationtitle": "questions[1].answer[0].title",
					"locationcontent": "questions[1].answer[0].content"
				},
				{
   
					"id":
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值