Create a string from a json array

hey there

i have been trying to get my tags, which are stored in a valid json array, to a string or even better to individual variables. i need them to add as tags for multiple outlets afterwards.

The output of the JSON is one of these formats:

“tags”: [“Tag1”, “Tag2”, ““Tag3”]

“hashtags”: [“#Hashtag4”, “#Hashtag5”, “#Hashtag6”, “#Hashtag7”, “#Hashtag8”]

my goal would be to have them available as individual tags in order to use them on the different platforms - preferrably without regex for maintainability.

by browsing the existing posts, i have tried to get stuff to work, but somehow i got lost in aggregators, splitters, mappers, etc.

thanks already for your help

Thom

Welcome to the Make community!

You’ve already got an Array represented in String format, so one way of doing it is to first parse the JSON with the JSONParse JSON” module.

Then, you will be able to use an Iterator on the array variable “tags”/“hashtags”, or use array functions on the array.

For more information, please refer to these courses in the Make Academy:

An introduction to data types and data structures

  • A brief introduction to Data Types
  • How to map Data Items
  • An introduction to Collections and Arrays

Introduction to Iterators and Array aggregators

  • Importing JSON into a new scenario
  • Iterating an array into bundles
  • Aggregating an array from bundles
  • Iterator and Aggregator use cases

Intermediate Functions

  • Transforming date and time using functions
  • Conditional functions
  • String and array conversion functions part 1
  • String and array conversion functions part 2

Hope this helps! Let me know if there are any further questions or issues.

@samliew
P.S.: investing some effort into the tutorials in the Make Academy will save you lots of time and frustration using Make!