Update 5.0 – Nested JSON, JSON Authentication, Caching, and the Update of Manual Tables

Update 5.0 – Nested JSON, JSON Authentication, Caching, and the Update of Manual Tables

wpDataTables 5.0 is finally here! With our latest update 5.0, we are excited to bring you some of the most requested new features – nested JSON, JSON authentication, caching, and the update of manual tables. You’ve made suggestions for all of them, so we spent a lot of hard-working hours to fulfill your expectations. So, without further ado, let’s just dive right in. Hope you like it!

Nested JSON

You are already familiar with using a JSON input. Our table creation wizard has worked great with Simple JSON files, but many of you requested more options for using more complex JSON files, where JSON objects are inside other JSON objects. These files are also known as Nested JSON data. As you requested, we created a new option where you can fetch and display different root paths of nested JSON data from the same source.

So, how does it work? Select the new option Nested JSON, insert JSON URL and request all JSON roots, after which you will be able to choose what root path you want to display in your table. If you are not satisfied with your choice, you can simply repeat the whole process again and select a different root path. Also, depending on your needs, you can choose between GET or POST method. You can see all this in the example below. If you want to find out more, click here.

JSON authentication

Basic Authentication

For those of you who need authentication for your JSON URL, we’ve created a separate option Basic Authentication”, which just requires you to enter the Username and Password in order to access your JSON URL. For more information, follow this link.

Custom headers

In some cases, APIs require different keys in order to be accessed. Therefore, we’ve added Custom headers, where you can add key-value pairs. For example, API key is one of them and it’s used to authenticate an application or a user. Also, if your API requires so, you are able to add multiple parameters for headers. For more information, follow this link.

Caching for wpDataTables

You ask, we deliver! Another thing a lot of you have been asking for – Caching for wpDataTables (tables created from existing data sources: Excel, CSV, Google sheet, XML, JSON, Nested JSON and PHP array) will primarily provide faster loading. How? Table data will be saved in the cache instead of being pulled from the data source. By enabling this option, if you change the data in the source code, your table won’t reflect those changes.

On the other hand, if you are looking to update your source file more often and want to keep the data in your table updated after a certain interval of time, then the new feature Auto update cache (from source file) will be perfect for you. With this option, table cache will be updated, based on the interval, which you can set in the Cron job.

This will be very useful if you are using Google Spreadsheet API or any other API with free limit access, and you won’t have to worry about Google sheet API access limitations. As mentioned above, you can use Cron job and decide for yourself how long the table should be getting data from cache, or when it should be updating and getting data from the source. Read more about this in our documentation.

You can see how to turn the caching option on in the example below.

  1. If you only select Cache data, even if you change the table data in the source, it will keep the old data, until you save the table in the back-end.
  2. If you also select Auto update cache, data form the table will be updated depending of your settings in a Cron job (5 min, 30 min or 1 hour etc.).

In the following example, we will show you how cashing works and how the table is updated. We’ve created a table used for tracking cryptocurrencies.

We used coingecko free API URL, which has limited access, that you can find here. With limited access, after several calls in a minute, table won’t receive any more data. When that happens, your table will become empty. With the caching and auto update option, like in this example (set to 5 min), limited access won’t be the problem anymore!

Update manual tables

Last but certainly not least, we’re bringing you the feature you’ve been asking for the most – “Update of manual tables”.

So, how can you use this feature? Well, that depends on what you want to do. You want to keep the same table with the same column headers, but change all records in it? Or maybe, you want to add new rows to the existing table columns? Or finally, you just want to replace the entire table with all new columns and rows? Each of these three options is available for CSV, Excel and Google sheet files. You just need to select the option you want and the table will be updated. For the first two options, you only need to make sure that the column headers in your source file match the ones in your existing table. If you want to find out more, click here.

In the example below, you can see that you can choose between these three options, after which you will be able to select the/your source file path or URL.

Replace rows with source data

The “Replace rows with source data” option allows you to remove all rows from the table, and add new ones. This can be useful, for example, when you want to keep the same column names and their order, add all new data in rows and compare two or more tables. Also, if you change one, or just a few cells in a table with lots of data, you don’t have to search for them in your table, just use this new option.

Add rows to current table data

The “Add rows to current table data” option allows you to keep the same columns and rows, and add new rows to that same table. This option is particularly useful when you want to fill the same table in a faster and easier way. Moreover, you can use this option when you have multiple tables in a different places that are being filled every day, and at the end, you want to combine all those records into one main table.

Replace entire table with source

The “Replace entire table with source” option allows you to replace the entire table by using different source. This can be useful, for example, when you want to use the same table ID, but change the table completely, or you’ve made a mistake when importing a table and want to insert a new one much faster.

You’ve seen some of our examples showcasing each of the three options, but the possibilities are endless! It is completely up to you how you want to use these options. We don’t have a doubt that you will find the right way.

This is just a glance into the new options and configurations that you can use with the wpDataTables 5.0 update. We are excited for you to try out these new features, enjoy and make your work better than before. Hope to see you with our next update, we are preparing some interesting and useful things. Until then, we are going back to work. See ya!

Up Next:

The Best Open-Source Data Visualization Tools You Should Use

The Best Open-Source Data Visualization Tools You Should Use