mahmoud / mahmoud/boltons

Convert list of dict items to list of string items

Open
#331 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
6.9k
Forks
441
Avg merge
3d 25m
Merged PRs (30d)
13

Description

Hi,
first of all thanks a lot for this create library. It saved me a lot of time.

I have the following problem where I need to remap a list of dict into a list of strings.

```
apps:
- slug: abc
- slug: def
```

should be converted to

```
apps:
- abc
- def
```

In general this an easy task if the dict is flat but in my case I have a nested dict and never can know when the list `apps` is located.

I tried several things with `remap` and `enter` but cannot get it working.

Any ideas would be appreciated.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the remap and enter APIs referenced in the issue, focusing on how they traverse nested dictionaries and lists. A complete change would define how a nested apps list is located and converted from dictionaries with slug values to strings, with behavior that can be verified for the shown examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.