# Parsing callback\_context

**URL:** <https://community.plotly.com/t/parsing-callback-context/54258>\
**Category:** Dash Python\
**Created:** [June 28, 2021, 3:12pm UTC](https://community.plotly.com/t/parsing-callback-context/54258 "2021-06-28T15:12:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sislvacl](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@sislvacl](https://community.plotly.com/u/sislvacl)\
**Post date:** [June 28, 2021, 3:12pm UTC](https://community.plotly.com/t/parsing-callback-context/54258/1 "2021-06-28T15:12:25Z")

</div>

Is there any good practice for parsing `callback_context`? I recently started working more with pattern-matching callbacks and extracting certain values from the `callback_context` became essential. Until today, I have been doing things such as

`idx = callback_context.states['packaging_concepts-div-waste_items.children'][-2]['props']['id']['index']`

😬 😬

There must be a better way! Right?!
