Oh yeah, deep waters. Definitely! The ArcGIS Online Assistant will warn you when you dare to edit an item's JSON:
You are about to directly modify the contents of an item. Do not proceed unless you are absolutely certain of the risks.
See also screen capture below. So, don't try this at home if you don't dare. And - very important - don't blame me if things go wrong... 🙂
But all that said, I do think it is doable... and it will save you the tedious work with all the popups and cartography stuff.
Above you state
the new data source has the same structure
so let's suppose only the URL and the item id are different (and all the rest is the same).
Steps to take:
- Login to ArcGIS Online Assistant and search your web map
- Choose I want to view an item's JSON
- Just having a look will hurt nobody. As long as you do not edit, nothing can go wrong - see second screen capture below
- Go to the Data section of your Web Map and copy the content (to have a backup)
- Search and replace the url and the itemId of your layer.
It might work (and save you a lot of work). Please let us know how it worked out.
Cheers,
Egge-Jan