there are three type icons in notion, i want to use ‘switch’ to handle diffrent icons(remove the unused keys), how can i do that
i wanted to copy the icon from “search objects” to the json before, but collection in json must has items, if i dont set any items, it can’t input
There is no straight way to remove the key from the collection, you can utilize Create JSON to recreate a new one based on the data you have on the original collection.
However, I think you want to ignore the key from the collection in Create JSON module, right? You can utilize the empty function and basically pass ignore if empty. Not sure if it works with collection though.
i try the “igore”, it can only remove one floor, like the “url” set “igore”, then the “url” is missing but the “external” is still here,i need to remove the whole “external”
@Simo can you help me to see that how to use one json to handle three diffrent icons.like when type = emoji,only leave emoji, or type = file, only leave file, remove another two keys
@Gene_Chen What if you use a Router, and 3 different JSON structures? One for type = emoji, one for type = file, and one for the third type. This way, you can easily remove the unnecessary keys from each JSON, and use filters to continue to the appropriate route.
Alternatively, you may try to build your JSON using a “Text Aggregator”, and using if statements to hide or show specific parts of the JSON
thanks for reply,i have used 3 different json to handle,
but i finally want to create the notion database item with icon( 3 type) and title(with link or not), it needed too many jsons
if use “text aggregator” how to do that?
Ahah - You should still be able to create the Notion database item (using the dedicated Notion module after each JSON in the 3 routes).
For the Text Aggregator, you can add the module in place of the “Create JSON” module and type out the JSON structure. If you want me to test it out, please share the full JSON structure you’re using (a screenshot is ok)
here is my scenario,i want to copy the current items and use its icon and parent, but change the title
the current items have diffrent icons and some titles i want to add a link

thanks, i have used text aggregator to finish it