Mapping a json document where an arbitrary key is having a nested object value

Hello,

given I want to index documents that look like
{ "id": {["key":"value"]}}
where id is an arbitrary value - how do I define the mapping? The keys within the nested object are definable, but the id is unpredictable.

Cheers,
Kai

Could you specify a bit more about your usecase? What are you using this data for? How do you plan to query that data?