Like Java having its Collection Framework .
Is there any api available in Javascript
where
we can Store JSON object in map for key value pair and
it will be having sort functionality and
List or Vector functionality where the size will be auto growable and
HashSet/TreeSet functionality to store duplicate free Json Object or item.
EDIT:
ListI terator functionality will be there where we can traverse bi-directionally.
One More functionality it lacking is removal of item from middle of array can be achieved so that it will rearrange after.
Comparator facity will be a added advantage.
No. Most of these features are native to JavaScript.
Yet, there are some libraries to extend these features. E.g. underscore.js treats Objects and Arrays both as iterable collections, there exist HashMap implementations for storing values by non-string-keys etc etc. Also, nearly all of the MVC frameworks implement their own collection objects (for models) to keep up with changes on them.
I've implemented HashTable
with arbitrary keys and HashSet
in my jshashtable.
ExtJs (definitely) and (I think) jQuery have such functionality.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With