omit
omit
function omits the specified keys from a JSON object.
Arguments
-
object
type:
object
The JSON object to omit keys from.
-
keys
type:
string[]
The keys to omit.
-
option
type:
object
-
arrayIndex
type:
"dot" | "bracket"
default:
"bracket"
The index of array to omit.
e.g.
[ "a[0]" ]
will omit to{ a: ["b"] }
ifarrayIndex
is"bracket"
, and[ "a.0" ]
will omit to{ a: { 0: "b" } }
ifarrayIndex
is"dot"
.
-