Navigation: Developing Apps > BINETIX® AGE™ API > The Node > Toolkits > age_lists
validate_keys/1
Description
validate_keys/1 is an Erlang function exported by "age_lists" module.
Validates an input list for Key/Value pairs and returns a normalized list with the same keys and values by removing any terms with different structure then {atom(), any()}.
References
•validate_keys/2
Parameters
Name
Type
Input
list()
Input list of terms.
Result
Value or Type
Returns a normalized list of pairs {Key, Value}.
Code Sample
> age_lists:validate_keys([{a, 1}, 12.5, {b, 2}, {c, 3}, "Test"]). [{a,1}, {b,2}, {c,3}]