Is it very convenient to process JSON object data like a database? Today, we will introduce TaffyDB, a great javascript class library, which can help you process JSON objects in the same way as databases.
Main features
The class library is very small and has good performance.
Powerful data selection Engine
Supports different database operations, such as insert, update, and delete.
Support various browsers
Compatible with other JS Class Libraries
You can easily develop and expand applications.
Chain operations are supported, and cool and super convenient
How to Use
The JSON object is as follows:
Var sites = TAFFY ([
{
Sitename: "GBin1.com ",
Url: http://www.gbin1.com"
},
{
Sitename: "Baidu.com ",
Url: http://www.baidu.com"
},
{
Sitename: "Google.com ",
Url: http://www.google.com"
}
])
Insert data:
Sites. insert ({sitename: "GBtags.com", url: "http://www.gbtags.com "});
Retrieve Data:
Sites (). order ("sitename"). each (function (item ){
$ ('# Demo '). append ('<li> <a href = "' + item. url + '">' + item. sitename + '</a> </li> ');
});
Is it very convenient, and you can use chained operations in js Code, so that the code is more concise. I hope you like this JS class library. If you have any questions, please leave us a message. Thank you!
Source: TaffyDB, a javascript class library that helps you access JSON data in a database