has
in JavaScriptThis is a handy function for checking if item exist in a nested structure
has(sourceList, path)
The list()
/c()
that is to be searched for the element
A string that can be separated by [,] or ., the string "elementname1.1.elementname"
the validity of the path - it only separates and tries to address that element with `[[]]`.
Returns a boolean.
Other lodash similar functions: retrieve
# NOT RUN {
has(list(a = list(b = 1)), "a.b")
# }
Run the code above in your browser using DataLab