我有一个像这样的json结构:
{
"filings": {
"All Reports": {},
"Statement Of Income Alternative": {
lieItem1 : [],
lineItem2 : []
},
"Statement Of Financial Position Classified (Parenthetical)": {},
"Statement Of Financial Position Classified": {},
"Statement Of Shareholders Equity And Other Comprehensive Income": {},
"Entity Information": {},
"Statement Of Cash Flows Indirect": {},
"Document Information": {},
"Notes to Financial Statements": {}
}
}
我正在使用get_json_object:
对hive中的这个结构进行查询 get_json_object(table.json,'$.filings.Statement Of Income Alternative.lineItem1')
术语Statement Of Income Alternative
的确切值未提前知道,因此可以在此使用正则表达式,我试过这个:
get_json_object(table.json,'$.filings.* Income Alternative*.lineItem1')
返回空结果。如果这个结构不允许我这样做任何其他建议吗?
答案 0 :(得分:0)
你有一个错字:json显示lieItem1,但你的表达式使用lineItem1