[New Plugin] JSON Machine Pro

Hey Jon,

I’m working with a JSON response from an API using the ReadJSON element to pull info from it. One of the outputs is a list of JSON texts. Is it possible to run this through another reader or something to pull out a field from each item in this list?

For example the list of JSON texts is {“id”:2000053,“name”:“ICU - Intensive Care Unit”}, {“id”:2000034,“name”:“ED - Emergency Department”} but I want to get the “id” number for each of those in a list of numbers.

Have you taken a look at the demo page? There is an example showing this working there.

I have but I’m only able to see that it’s used in a repeating group. Am I missing something? I’d like to not have to feed it into a repeating group.

Did you look at the pro advanced array demo?

Okay - like all bloody Bubble plugins the doc is non-existant

Sorry but you just get tired of every single one having no docs, examples that no longer work, etc.

It is like 1986 playing Zork (you are in a dark room, there is a table with a candle on it, you are facing east, good luck…)

All I want to do is load this:

[{“Hub”:“LNS”,“Longitudes”:"[151.250650023, 151.2505730080001, 151.2504990230001]",“Latitudes”:"[-33.84395900499993, -33.84390899899995, -33.84385399799993]"}]

Actually, ideally, the array of these has more than 1 element and the lists of latitudes and longitudes would be much longer but let’s start small.

Can this be done?

I am about to give up and fall back to regex - one would think that this sort of thing would be well addressed.

Sorry for the gripe, just that this plugin is last in a long list of plugins that really have zero effective documentation. This is the single biggest failing of Bubble. (I write this as a sometimes s/w dev who is also shit at documenting but then again, I’m not taking money off people for my undocumented s/w)

sadly
Andrew

Okay - that is about as simple a piece of JSON as I can manage.

There is a read/writeJSON Bulk element on the page with id “info”

Simple question - can this code manage that array? [1,2,3]

thanks

I can sense your frustration. Trust me, I’ve been there. :slight_smile:

I’m going to refer you to the documentation.

image

Still, without much context this may not be too useful to you so why don’t you look at the fully-functional demo page that does exactly what you’re asking. You’ve got to chain together workflow steps to (a) extract the array and (b) work with it.

https://getjson.bubbleapps.io/array_example_local

Also, with much empathy towards your current predicament, I would say that you can always just send a friendly message asking for help. This stuff can be surprisingly complex. I wouldn’t expect anyone to be able to figure it all out on their own without help. Plugin developers are often a single person who may or may not be skilled at, interested in, or able to devote the time to building out robust documentation. That being said, in this case it was all here for you. Maybe it wasn’t the easiest to find…

Bubble is partially to blame here too IMO. There really needs to be an overhaul to the way plugins are demo-ed, documented, etc. Like a microsite for each plugin with a template containing sections for everything you might need. This would encourage better documentation and make it easier to find stuff.

Larger development agencies tend to build their own demo sites with this stuff, but it should be universal to every plugin and hosted in the plugin store. Like a single place to search through and view all the ‘stuff’ of a given plugin. Anyways I digress.

Jon

I agree - lots of frustration there and I get the small dev issue. I tried to put that in there somewhere.

The issue seems to be that if a plugin stays around for a while then you pick it up, the early demo pages are often now defunct/non-operational so you need to wade through a stream of consciousness stuff looking for a functional demo. Having said that you will tell me somewhere it is blindingly obvious to find.

And after all that, the free JSONata plugin seems to do the trick and, because it is based on a larger open source, well-documented component - is easy to work out.

I happily pay for these other plugins as it helps the community but it would be great if (as you say) Bubble provided a better structure for the plugin microsites. e.g. Allow for active links on the plugin directory.

And I did spend a lot of time looking at exactly that demo but it does not address my problem space because it, conveniently for this tool (it seems), uses named JSON elements everywhere as opposed to arrays of items.

{“names”: [{“name”:“fred”},{“name”:“bill”},{“name”:“Helen”}]}

as opposed to…

{“names”:[“fred”,“bill”,“helen”]}

So not really the same at all when the tool seems to want to reference names. I am just guessing here and could well be wrong because my JS is crap and there is no documentation (as mentioned earlier).

thanks again

Hello, As many in the page, for me is difficult to understand what to do looking only at the demo page. Is there a documentation of the plug in? I have not been able to see any documentation. Is the documentation only available once you buy the plugin?. Best regards.

Try checking this new one out:

2 Likes