Question: I am trying to create an object with modified keys after `map()` function (the data is from API), here is my code:

```
    const getData = mySchedule.schedules.map((data) => ({
      [data.id]: false,
    }));
    setCheckId(getData);

```

This code return:

[![enter image description here](https://i.stack.imgur.com/SSvPp.jpg)](https://i.stack.imgur.com/SSvPp.jpg)

And I want this output:

[![enter image description here](https://i.stack.imgur.com/o8NX2.jpg)](https://i.stack.imgur.com/o8NX2.jpg)

Do you have any solution for this case? thank you.

Answer: 
I found the hint in what looks like the original [feature description](https://codereview.qt-project.org/c/pyside/pyside-setup/+/304274):

> 
> The decision depends of the following setting at the beginning of
> a module after PySide2 import:
> 
> 
> 
> ```
> from __feature__ import snake_case
> 
> ```
> 
> 

The key thing that I had missed was that you have to place that *after the PySide2 import*. With further experimenting, I found that you have to place it after all other imports, not just PySide6. Any later import will reset the feature flags.

When I move that line, the new version works. My IDE hates it, though, so I have to turn off validation for that line:

```
import sys
from PySide6.QtWidgets import (QTableWidget, QPushButton, QVBoxLayout,
                               QApplication, QWidget)

# noinspection PyUnresolvedReferences
from __feature__ import snake_case, true_property

class MyWidget(QWidget):
    def __init__(self):
        super().__init__()

        table = QTableWidget()
        table.column_count = 2

        button = QPushButton("Add")
        button.enabled = False

        layout = QVBoxLayout(self)
        layout.add_widget(table)
        layout.add_widget(button)

if __name__ == "__main__":
    app = QApplication([])

    widget = MyWidget()
    widget.resize(800, 600)
    widget.show()

    sys.exit(app.exec_())

```
One important point is that for popper IDE auto-completion support one has to re-generate the python stubs files to reflect the selected notation. This is done simply by calling:

```
pyside6-genpyi all --feature snake_case true_property

```

Then one needs to add the `__feature__` tag after importing PySide as:

```
import PySide6
from __feature__ import snake_case, true_property

...

```

Full documentation: <https://doc.qt.io/qtforpython/feature-why.html>