Rename Attributes
- properties.rename_multiple
Input:
- objects – Property-Holder
- keys_from – String
- keys_to – String
Output:
- output – Property-Holder
Renames multiple attributes on every object. The entries in keys_from and keys_to are
matched by position: the first source key is renamed to the first target key, the second source
key is renamed to the second target key, and so on. Both lists must have the same length.
Example: with keys_from = ["old_name", "old_id"] andkeys_to = ["name", "id"], each object is changed from{"old_name": "Tree", "old_id": 7} to {"name": "Tree", "id": 7}.