首页 > 解决方案 > 为了审计目的,需要在 JSON 数据中与子实体一起显示的父字段

问题描述

实际上,我的 UI 中有 2 个下拉菜单,两个下拉菜单中的字段名称/键相同,类似于此

下拉字段1

下拉字段1

当我尝试审核特定字段上的任何插入/更新等字段时,我只获得下拉字段名称,但我需要获取字段名称及其父名称。

我的 JSON 数据,在 UI 上获取:

{
  "key"   :"fieldLabel",
  "label" :"FieldName",
  "type"  :"static-content"
},
{
  "key"   :"action",
  "label" :"Action",
  "type"  :"static-content"
},
{
  "key"   :"value",
  "label" :"Value",
  "type"  :"static-content"
},

在这里,密钥是从数据服务中获取的。

Key "fieldLabel" contains the dropdown1 and dropdown2

什么是审计

FieldName      Action     Value 

TYPE1         insert        -
TYPE1         insert        -
 .
 .
TYPE1         update        -
TYPE1         insert        -
 .
 .

需要的是,类似于这个

   FieldName            Action     Value 

Dropdown1: TYPE1         insert        -
Dropdown1: TYPE1         insert        -
 .
 .
Dropdown2: TYPE1         update        -
Dropdown2: TYPE1         insert        -
 .
 .

基本上,我需要区分这些领域。那么,我如何更改 JSON 或任何字段

标签: json

解决方案


推荐阅读