Launch Darkly Snippets
The code will extract the data for the given variation of the product and store it in the variable 'value'. The variable 'index' will store the variation's position in the list of variations, while the variable 'reason' will store the reason for the variation.
Library: launchdarkly-server-sdk
Shortcut: launchdarkly.variation_detail
detail = ldclient.variation_detail(flag_key, user, False)
value = detail.value
index = detail.variation_index
reason = detail.reason