2017-08-30 8 views
1

で空のオブジェクトまたは配列ならば、私は、次の入力JSON持つエントリを削除します。Joltの

{ 
    "Accounts": [ 
     { 
      "Reference": { 
       "Key": "1111", 
       "System": "Oracle" 
      }, 
      "ContactMethods": { 
       "Phone": [{...}, {...}, ...], 
       "Email": [{...}, {...}, ...], 
       "Address": [], // remove this 
       "Website": [] // remove this 
      }, 
      "Registration" : {...} 
     }, 
     { 
      "Reference": { 
       "Key": "2222", 
       "System": "DB2" 
      }, 
      "ContactMethods": { 
       "Phone": [{...}, {...}, ...], 
       "Email": [], // remove this 
       "Address": [], // remove this 
       "Website": [{...}, {...}, ...] 
      }, 
      "Registration" : {} // or null, remove this 
     }, 
    ] 
} 

どのように私は空のオブジェクト、空の配列またはnullのどちらかであるエントリを削除しますか?

答えて

1

「条件付き」削除はサポートされていません。

関連する問題