mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 07:59:35 +00:00
Return a standard json format for arrays
This commit is contained in:
parent
da44b8fb65
commit
6eec119083
8 changed files with 32 additions and 13 deletions
|
|
@ -32,7 +32,10 @@ for _, l4_key in pairs(l4_keys) do
|
|||
-- 2.1 string ICMP
|
||||
-- 2.2 string icmp
|
||||
-- 2.3 number 1
|
||||
res[l4_key[1]] = {proto_id = l4_key[3]}
|
||||
res[#res + 1] = {
|
||||
name = l4_key[1],
|
||||
id = l4_key[3],
|
||||
}
|
||||
end
|
||||
|
||||
print(rest_utils.rc(rc, res))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue