The invention discloses a data flattening
processing method, a
dynamic data verification method, equipment and a medium. The method comprises the following steps: performing recursive traversal on multi-layer nested
JSON (
JavaScript Object Notation) data; when the
object type is traversed, splicing the parent path and the current key name to form a new path; when the array type is traversed, expansion is carried out by an index or an identifier; when a basic type is traversed, taking a complete path as a key and taking a value as corresponding content, and storing into a
result set; in the data recursive traversal process, the context
hierarchical relation of data is reserved, and single-layer key value pair mapping is generated.
JSON data of a multi-level nested structure is expanded into a path type key value pair structure in a recursive mode, flattening
processing of the data is achieved, efficient
processing of complex
nested data is achieved through the flattening processing method, the context relation of the data is reserved, meanwhile, the positioning and
data verification logic of complex fields is greatly simplified, and the
data verification efficiency is improved. The problems that the
data verification logic rule is complex and the execution efficiency is low are well solved.