oscal-content | NIST SP 800-53 content and other OSCAL content examples | Frontend Framework library
kandi X-RAY | oscal-content Summary
kandi X-RAY | oscal-content Summary
NIST SP 800-53 content and other OSCAL content examples
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of oscal-content
oscal-content Key Features
oscal-content Examples and Code Snippets
Community Discussions
Trending Discussions on oscal-content
QUESTION
I want to take the data from here: https://raw.githubusercontent.com/usnistgov/oscal-content/master/examples/ssp/json/ssp-example.json
which I've pulled into a mySQL database called "ssp_models" into a JSON column called 'json_data', and I need add a new 'name' and 'type' entry into the 'parties' node with a new uuid in the same format as the example.
So in my mySQL database table, "ssp_models", I have this entry: Noting that I should be able to write the data by somehow referencing "66c2a1c8-5830-48bd-8fdd-55a1c3a52888" as the record to modify.
All the example I've seen online seem to force me to read out the entire JSON into a variable, make the addition, and then cram it back into the json_data column, which seems costly, especially with large JSON data-sets.
Isn't there a simple way I can say
"INSERT INTO ssp_models JSON_INSERT
I was looking at this other stackoverflow example for inserting into JSON:
How to create and insert a JSON object using MySQL queries?
However, that's basically useful when you are starting from scratch, vs. needing to add JSON data to data that already exists.
...ANSWER
Answered 2021-Feb-20 at 22:58You may want to read https://dev.mysql.com/doc/refman/8.0/en/json-function-reference.html and explore each of the functions, and try them out one by one, if you're going to continue working with JSON data in MySQL.
I was able to do what you describe this way:
QUESTION
I want to take the data from here: https://raw.githubusercontent.com/usnistgov/oscal-content/master/examples/ssp/json/ssp-example.json
which I've pulled into a mySQL database called "ssp_models" into a JSON column called 'json_data', and I need to retrieve the 'name' and 'type' values from the 'parties' node which is nested 3 levels deep.
I've been trying to follow this blog-post about how to retrieve nested data: https://mysqlserverteam.com/json_table-the-best-of-both-worlds/
and I am struggling with the nesting selection process. Obviously this is not the right way:
...ANSWER
Answered 2021-Feb-18 at 22:54You don't need NESTED PATH because the JSON only contains objects-within-objects from the top level down to the array you want to become rows of your json table:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install oscal-content
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page