Expands variable placeholders in objects.