Skip to content

Commit

Permalink
Improve documentation for README
Browse files Browse the repository at this point in the history
  • Loading branch information
ivancorrales committed Aug 7, 2023
1 parent f85b9ae commit 03f195f
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,28 @@

The `swiss knife` to deal with the hassle of `unstructured data`.

```go
func main(){
k := knoa.Map().Set("firstname", "John", "age", 20)

k.Set("siblings", []Person{
{
Firstname: "Tim",
Age: 29,
},
{
Firstname: "Bob",
Age: 40,
},
})

k.Set("age", 23, "siblings[1].age", 39)

var person Person
k.To(&person)
}
```

## Getting started

### Installation
Expand Down Expand Up @@ -91,7 +113,7 @@ fmt.Println(k.String())



**Decode an unstructured data into a struct and an array of structs**
**Decode an unstructured data into an array of structs**
```go

type Person struct {
Expand Down

0 comments on commit 03f195f

Please sign in to comment.