Hello everyone !
I need your support to find a solution, which is currently blocked.
Here’s the description of my need:
From a JSON code, I need to know the exact position number of a key.
To do this, I’m using Eli’s plugin, which I’m sure is very powerful.
I’ve also been following Eli’s topic (1 Thing Plugin - Index Finder - Get the index number for any item in your list), but I don’t understand what’s causing my problem.
In order of reasoning :
1/ I receive a JSON code in text format (thanks to the 1T CSV Uploader plugin, also from Eli)
2/ In a repeating group, my columns display the JSON code information correctly (one key = one column), using ‘readjson’ (JSON MACHINE plugin)
1 and 2 WORKS
And now things are getting complicated.
Originally, this JSON code was generated from a contact file where the keys were filled in by my customer: this means that the position of the keys in the JSON code are never in the same position.
As a result, to record the information in the database (from the CSV file converted into JSON code), I need to be able to target the key position I want and send it to the right column in the database.
My problem isn’t with the key name matching the column I have in my database, because I use Eli’s 1T CSV Uploader plugin to do just that.)
The workflow below works and allows me to have all the JSON code temporarily stored in my database :
Below, I don’t know if it works.
From what I understand of how the ‘1 T Plugin - Index Finder’ works:
- I select the element concerned (here FindIndex A)
- The data in my code is in text format
- The list of elements (the JSON code in text format) can be found in the JSON code generated by importing the CSV file
- And finally, the position of the key I’m looking for is: ‘pronom’.
This results in :
Finally, I want to save the exact position of the ‘first name’ key in my temporary database, so that I can retrieve it in another workflow.
And it doesn’t work.
The plugin doesn’t report any bugs.
I have difficulty using this key position search function.
The result I’m looking for is a number, like ‘14’ or something.
The ‘FindIndex A’ is in a group, which normally allows it to receive the JSON code
Here is my temporary database :
(don’t worry, this is an example, all personal information entered and visible here are all fake/wrong)
Do you have any ideas to help me?
I’m ready to pay for a coffee!
Matthieu