You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a functionality for the contains helper to check if an object has a specific key and/or a value.
If an object is passed as the haystack, then the helper loops through all the keys and does a loose comparison on the values by the given needle and returns true if the needle is found. The key paramater will be changed to map.
{@contains map=haystack value="needle" /}
If only the key parameter is set, then the helper checks whether the given key is set in the array/object.
{@contains map=haystack key="needle" /}
If the key and value parameters are set, then the helper checks whether the given key is set in the array/object and it loosely matches the given value.
Add a functionality for the
contains
helper to check if an object has a specific key and/or a value.If an object is passed as the haystack, then the helper loops through all the keys and does a loose comparison on the values by the given needle and returns true if the needle is found. The
key
paramater will be changed tomap
.If only the
key
parameter is set, then the helper checks whether the given key is set in the array/object.If the
key
andvalue
parameters are set, then the helper checks whether the given key is set in the array/object and it loosely matches the given value.The text was updated successfully, but these errors were encountered: