# Java client\_ Retrieving id of a object using filters. How to handle \_additional parameters in java

**URL:** <https://forum.weaviate.io/t/java-client-retrieving-id-of-a-object-using-filters-how-to-handle-additional-parameters-in-java/779>\
**Category:** General\
**Created:** [October 5, 2023, 2:59am UTC](https://forum.weaviate.io/t/java-client-retrieving-id-of-a-object-using-filters-how-to-handle-additional-parameters-in-java/779 "2023-10-05T02:59:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ashmi\_Fernando](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/ashmi_fernando/32/547_2.png) [@Ashmi\_Fernando](https://forum.weaviate.io/u/Ashmi_Fernando)\
**Post date:** [October 5, 2023, 2:59am UTC](https://forum.weaviate.io/t/java-client-retrieving-id-of-a-object-using-filters-how-to-handle-additional-parameters-in-java/779/1 "2023-10-05T02:59:01Z")

</div>

Im working in a project which I need to update the already saved object in the db. I can get the object using a filter but how to get the id also in the response

---

<div class="post-metadata">

**Author:** ![jphwang](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jphwang/32/38_2.png) [@jphwang](https://forum.weaviate.io/u/jphwang)\
**Post date:** [October 6, 2023, 9:12am UTC](https://forum.weaviate.io/t/java-client-retrieving-id-of-a-object-using-filters-how-to-handle-additional-parameters-in-java/779/2 "2023-10-06T09:12:14Z")

</div>

Hi @Ashmi_Fernando

You can get the ID in the response as shown here in Java:

> **[GraphQL - Additional properties | Weaviate - vector database](https://weaviate.io/developers/weaviate/api/graphql/additional-properties#example)**
>
> Introduction

Please see the code example relating to:

```java
    Field _additional = Field.builder()
      .name("_additional")
      .fields(new Field[]{
        Field.builder().name("id").build(),
        Field.builder().name("distance").build()
      }).build();

    ...

    Result<GraphQLResponse> result = client.graphQL().get()
      .withClassName("Article")
      .withFields(title, _additional)
      .withNearText(explore)
      .run();

```
