elliotchance / elliotchance/gedcom

Returning the @Identifier of a .Parents field only returns a single value, not two

Open
#321 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
124
Forks
25
PR merge metrics
No merged PRs in 30d

Description

I'm confused when I'm looking at a .Parents or .Spouses field then returning the raw data returns everything in an odd textual format

but if I ask for the .Identifier, I get only one

```
./gedcom query -format csv -gedcom ~/Downloads/pres2020.ged '.Individuals | { name: .Name | .String, born: .Birth | .String, died: .Death | .String, id: .Identifier, sex:.Sex, parents:.Parents | .Identifier, parentNames:.Parents }' | head -3
born,died,id,name,parentNames,parents,sex
,,@I2184@,Paul Stobbe,[],[],Male
19 Aug 1946,,@I1@,William Jefferson Clinton,"[William Jefferson Blythe II (b. 27 Feb 1918, d. 17 May 1946) ⚭ Virginia Dell Cassidy (b. 6 Jun 1923, d. Jan 1994)]",[@F2@],Male
```

Any ideas what I'm doing wrong?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the reported `gedcom query` command against the sample GEDCOM data and compare `.Parents | .Identifier` with `.Parents`. Trace how the query evaluates collection fields and formats CSV output. Done means `.Identifier` preserves every identifier for multi-value `.Parents` and `.Spouses` fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.