Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for getting array index in GetValue #321

Merged
merged 4 commits into from
Apr 9, 2024

Commits on Oct 9, 2023

  1. Add unit test for data.GetValue

    cmurphy authored and MbolotSuse committed Oct 9, 2023
    Configuration menu
    Copy the full SHA
    fa1a987 View commit details
    Browse the repository at this point in the history
  2. Add support for getting array index in GetValue

    Add the ability to use an index number to get an item out of a slice.
    
    The number will still be a string representation of an integer. For
    example, to get the last element from a nested slice like:
    
    ```
    data := map[string]interface{}{
        "data": []interface{}{
            "first",
            "second",
            "third",
        },
    }
    ```
    
    Use keys like
    
    ```
    val := GetValues(data, "data", "2")
    ```
    cmurphy authored and MbolotSuse committed Oct 9, 2023
    Configuration menu
    Copy the full SHA
    63eb31b View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2024

  1. Adding package comments for data package

    Adds package comments and extra test cases
    MbolotSuse committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    1592712 View commit details
    Browse the repository at this point in the history

Commits on Feb 23, 2024

  1. Restoring GetValue

    Restores GetValue to it's original interface to avoid breaking changes.
    MbolotSuse committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    53fba45 View commit details
    Browse the repository at this point in the history