nembel / apps / jsonswap
app name
JS: json key swap
command
/jsonswap
description
Swap keys/values of associative-array-style JSON.

Analogous to array_flip in PHP.

Adds function `jsonSwap` to the window context.

EXAMPLE: {"cat":"meow", "dog":"bark"}
→ { "meow":"cat", "bark":"dog"}

TIP: Single quoted strings like 'this' are not valid JSON.

USE: Create a reverse lookup.
how to use this app

Option 1: Click the "try it now button" above.

Option 2: Go to nembel.com and type /jsonswap

Option 3: Install this bookmarklet: /jsonswap

Option 4: Install the Nembel toolbar bookmarklet to instantly access hundreds of tools like this on any web page.

about nembel web apps

Nembel web applications are online tools, utilities, and search shortcuts. Each one can be used from the home page, the toolbar, or saved as separate bookmarklets. Our instant online apps can be used without logging in or signing in. No account, no signup, and no registration is required or necessary.

Many can be used directly and instantly on the Nembel home page.

Visit the home page and type keywords to see relevant tools, or browse the list at nembel.com/apps/