例如,我有 nginx 和传入的 JSON 标头:
{
"orgs" : {
"first_org_roles": ["role_a_r", "role_b_r", "role_c_r"],
"second_org_roles": ["role_d_r", "role_e_r", "role_f_r"]
}
}
是否可以将其解析成数组:
["role_a_r", "role_b_r", "role_c_r", "role_d_r", "role_e_r", "role_f_r"]
并将其设置为 nginx 中的标头?